package com.googlecode.icecube.presentation;


import java.io.Serializable;

import javax.swing.tree.DefaultMutableTreeNode;

import com.icesoft.faces.component.tree.IceUserObject;


/**
 * Tree node definition to use for individual attributes.
 * 
 * @author Rainer Eschen
 * 
 */
public class TreeNodeUserObject extends IceUserObject implements Serializable {

    private static final long serialVersionUID = -5696635637266853136L;

    /**
     * Identifier for position calculation
     */
    private int id;

    public TreeNodeUserObject(DefaultMutableTreeNode wrapper, String skin) {
        super(wrapper);
        this.init(skin);
    }

    protected void init(String skin) {
        this.setBranchExpandedIcon(skin + "/css-images/tree_folder_open.gif");
        this.setBranchContractedIcon(skin + "/css-images/tree_folder_closed.gif");
        this.setLeafIcon(skin + "/css-images/tree_document.gif");
        this.setExpanded(true);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }


}
